Optimal. Leaf size=155 \[ \frac {35 b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {35 b \sin (c+d x)}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2913, 2670,
272, 45, 2672, 294, 308, 212} \begin {gather*} \frac {a \cos ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {3 a \sec ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {35 b \sin (c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {35 b \tanh ^{-1}(\sin (c+d x))}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 212
Rule 272
Rule 294
Rule 308
Rule 2670
Rule 2672
Rule 2913
Rubi steps
\begin {align*} \int \sin ^2(c+d x) (a+b \sin (c+d x)) \tan ^5(c+d x) \, dx &=a \int \sin ^2(c+d x) \tan ^5(c+d x) \, dx+b \int \sin ^3(c+d x) \tan ^5(c+d x) \, dx\\ &=-\frac {a \text {Subst}\left (\int \frac {\left (1-x^2\right )^3}{x^5} \, dx,x,\cos (c+d x)\right )}{d}+\frac {b \text {Subst}\left (\int \frac {x^8}{\left (1-x^2\right )^3} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}-\frac {a \text {Subst}\left (\int \frac {(1-x)^3}{x^3} \, dx,x,\cos ^2(c+d x)\right )}{2 d}-\frac {(7 b) \text {Subst}\left (\int \frac {x^6}{\left (1-x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{4 d}\\ &=-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}-\frac {a \text {Subst}\left (\int \left (-1+\frac {1}{x^3}-\frac {3}{x^2}+\frac {3}{x}\right ) \, dx,x,\cos ^2(c+d x)\right )}{2 d}+\frac {(35 b) \text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\sin (c+d x)\right )}{8 d}\\ &=\frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}+\frac {(35 b) \text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{8 d}\\ &=\frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {35 b \sin (c+d x)}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}+\frac {(35 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{8 d}\\ &=\frac {35 b \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a \cos ^2(c+d x)}{2 d}-\frac {3 a \log (\cos (c+d x))}{d}-\frac {3 a \sec ^2(c+d x)}{2 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {35 b \sin (c+d x)}{8 d}-\frac {35 b \sin ^3(c+d x)}{24 d}-\frac {7 b \sin ^3(c+d x) \tan ^2(c+d x)}{8 d}+\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.45, size = 156, normalized size = 1.01 \begin {gather*} -\frac {a \left (12 \log (\cos (c+d x))+6 \sec ^2(c+d x)-\sec ^4(c+d x)+2 \sin ^2(c+d x)\right )}{4 d}-\frac {b \sin ^3(c+d x) \tan ^4(c+d x)}{3 d}-\frac {7 b \left (8 \sin (c+d x) \tan ^4(c+d x)+5 \left (6 \sec ^3(c+d x) \tan (c+d x)-8 \sec (c+d x) \tan ^3(c+d x)-3 \left (\tanh ^{-1}(\sin (c+d x))+\sec (c+d x) \tan (c+d x)\right )\right )\right )}{24 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 177, normalized size = 1.14
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{9}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {5 \left (\sin ^{9}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {5 \left (\sin ^{7}\left (d x +c \right )\right )}{8}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}-\frac {35 \sin \left (d x +c \right )}{8}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(177\) |
default | \(\frac {a \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )+b \left (\frac {\sin ^{9}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {5 \left (\sin ^{9}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {5 \left (\sin ^{7}\left (d x +c \right )\right )}{8}-\frac {7 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {35 \left (\sin ^{3}\left (d x +c \right )\right )}{24}-\frac {35 \sin \left (d x +c \right )}{8}+\frac {35 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(177\) |
risch | \(3 i a x -\frac {i b \,{\mathrm e}^{3 i \left (d x +c \right )}}{24 d}+\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {13 i b \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {13 i b \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {i b \,{\mathrm e}^{-3 i \left (d x +c \right )}}{24 d}+\frac {6 i a c}{d}+\frac {i \left (24 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+13 b \,{\mathrm e}^{7 i \left (d x +c \right )}+32 i a \,{\mathrm e}^{4 i \left (d x +c \right )}+5 b \,{\mathrm e}^{5 i \left (d x +c \right )}+24 i a \,{\mathrm e}^{2 i \left (d x +c \right )}-5 b \,{\mathrm e}^{3 i \left (d x +c \right )}-13 b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{8 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{8 d}\) | \(292\) |
norman | \(\frac {\frac {22 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {22 a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a}{3 d}-\frac {35 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {35 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {329 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {17 b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {329 b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {35 b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {35 b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {16 a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {3 a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (24 a -35 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}-\frac {\left (24 a +35 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}\) | \(310\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 132, normalized size = 0.85 \begin {gather*} -\frac {16 \, b \sin \left (d x + c\right )^{3} + 24 \, a \sin \left (d x + c\right )^{2} + 3 \, {\left (24 \, a - 35 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (24 \, a + 35 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) + 144 \, b \sin \left (d x + c\right ) - \frac {6 \, {\left (13 \, b \sin \left (d x + c\right )^{3} + 12 \, a \sin \left (d x + c\right )^{2} - 11 \, b \sin \left (d x + c\right ) - 10 \, a\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 149, normalized size = 0.96 \begin {gather*} \frac {24 \, a \cos \left (d x + c\right )^{6} - 3 \, {\left (24 \, a - 35 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (24 \, a + 35 \, b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 12 \, a \cos \left (d x + c\right )^{4} - 72 \, a \cos \left (d x + c\right )^{2} + 2 \, {\left (8 \, b \cos \left (d x + c\right )^{6} - 80 \, b \cos \left (d x + c\right )^{4} - 39 \, b \cos \left (d x + c\right )^{2} + 6 \, b\right )} \sin \left (d x + c\right ) + 12 \, a}{48 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.59, size = 135, normalized size = 0.87 \begin {gather*} -\frac {16 \, b \sin \left (d x + c\right )^{3} + 24 \, a \sin \left (d x + c\right )^{2} + 3 \, {\left (24 \, a - 35 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (24 \, a + 35 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 144 \, b \sin \left (d x + c\right ) - \frac {6 \, {\left (18 \, a \sin \left (d x + c\right )^{4} + 13 \, b \sin \left (d x + c\right )^{3} - 24 \, a \sin \left (d x + c\right )^{2} - 11 \, b \sin \left (d x + c\right ) + 8 \, a\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.27, size = 346, normalized size = 2.23 \begin {gather*} \frac {3\,a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {-\frac {35\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{4}-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+\frac {35\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{6}+6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\frac {329\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{12}+16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-17\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+16\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {329\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {35\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}-6\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {35\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (3\,a+\frac {35\,b}{8}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (3\,a-\frac {35\,b}{8}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________